package com.wlcj.www.enumtype;


/**
 * 域名枚举类
 * @author huan
 *
 */
public enum DomainEnum {
	

	KEY(1,"weilaijinrong"),
	DOMAIN_WD(2,".weilaiwd.com"),
	DOMAIN_JC(3,".weilaijc.com");
	private int id;
	private String desc;
	private DomainEnum(int id, String desc ) {
		this.id = id;
		this.desc = desc;
	}


	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	public static DomainEnum getEnumByName(int id) {
		DomainEnum[] enums = DomainEnum.values();
		for(DomainEnum enumtype:enums) {
			if(enumtype.getId()==id) {
				return enumtype;
			}
		}
		return KEY;
	}
}